import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('./views/Home.vue')
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
    },
    {
      path: '/special',
      name: 'special',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/Special.vue')
    },
    {
      path: '/fics',
      name: 'fics',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/Fics.vue')
    },
    {
      path: '/specialshow/:id',
      name: 'specialshow',
      component: () => import(/* webpackChunkName: "about" */ './views/SpecialShow.vue'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/advert/:id',
      name: 'advert',
      component: () => import(/* webpackChunkName: "about" */ './views/Advert.vue'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/proseminarshow/:id',
      name: 'proseminarshow',
      component: () => import(/* webpackChunkName: "about" */ './views/ProseminarShow.vue'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/prayer',
      name: 'prayer',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/Prayer.vue')
    },
    {
      path: '/prayeradd',
      name: 'prayeradd',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/PrayerAdd.vue')
    },
    {
      path: '/link',
      name: 'link',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/Link.vue')
    },
    {
      path: '/keywords/:keywords',
      name: 'keywords',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/Keywords.vue')
    },
    {
      path: '/linkadd',
      name: 'linkadd',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ './views/LinkAdd.vue')
    },
    {
      path: '/show/:id',
      name: 'show',
      component: () => import(/* webpackChunkName: "about" */ './views/Show.vue'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/News/show/id/:id',
      name: 'show',
      component: () => import(/* webpackChunkName: "about" */ './views/Show.vue'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/list/:id/:pid',
      name: 'list',
      component: () => import(/* webpackChunkName: "about" */ './views/List.vue'),
      meta: {
        isUseCache: true, // 这个字段的意思稍后再说  
        keepAlive: true // 通过此字段判断是否需要缓存当前组件 
      }
    }
  ]
})
